-- GENERATED SPELL FOR [Blackwing Spellbinder] --


function spell0_12457(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(22275,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12457', 10000, 1)
end

function spell1_12457(pUnit, Event) --@Greater Polymorph,n/a--
pUnit:FullCastSpellOnTarget(22274,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12457', 20316, 1)
end

function Sorts_12457(pUnit, Event)
local choix_sorts_12457 = math.random(0, 1)
if choix_sorts_12457 == 0 then
pUnit:RegisterEvent('spell0_12457', 1, 1)
end
if choix_sorts_12457 == 1 then
pUnit:RegisterEvent('spell1_12457', 1, 1)
end
end

function mob12457_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12457', math.random(1500, 3000), 1)
end

function mob12457_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12457_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12457_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12457, 1, 'mob12457_Action')
RegisterUnitEvent(12457, 2, 'mob12457_Leave')
RegisterUnitEvent(12457, 3, 'mob12457_Kill')
RegisterUnitEvent(12457, 4, 'mob12457_Die')
